package com.onlinemarket.thrid.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.onlinemarket.thrid.daoimpl.registerImpl;
import com.onlinemarket.thrid.domain.User;

@Controller
@RequestMapping(value = "/register")
public class registerControl {

	@Autowired
	registerImpl registerimpl;

	@RequestMapping(value = "/insertinfo")
	public String insertinfo(String username, String password, int sex, String telephone, String address) {
		User user = new User(username, password, sex, telephone, address);
		registerimpl.insertUser(user);
		return "success";

	}
}
